:root {
  --bg: #0b1023;
  --panel: rgba(255,255,255,0.08);
  --text: #eaeef7;
  --accent: #ff75aa;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans SC', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: radial-gradient(1200px at 50% 120%, #0b1023, #070a16 60%, #04060e);
  color: var(--text);
  overflow: hidden;
}

#canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#ui {
  position: fixed;
  left: 16px; right: 16px; top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  z-index: 10;
}

.title {
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--panel);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 10px 12px;
}

.controls, .message-bar {
  display: flex;
  gap: 8px;
  background: var(--panel);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 8px;
  flex-wrap: wrap;
}

button {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
button:hover { transform: translateY(-1px); }
button.active, button:active { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35); }

input#confessText {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9;
  pointer-events: none;
}
#overlay.hidden { display: none; }

#overlayText {
  font-weight: 800;
  font-size: clamp(28px, 6vw, 72px);
  line-height: 1.1;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 20px rgba(255, 90, 150, 0.6), 0 0 40px rgba(80, 160, 255, 0.4);
}

footer {
  position: fixed;
  bottom: 10px; left: 0; right: 0;
  text-align: center;
  opacity: 0.65;
  font-size: 12px;
}

.fireworks-container {
  position: fixed;
  inset: 0;
  z-index: 1; /* 在自定义画布之上，但在UI之下 */
  pointer-events: none; /* 不遮挡顶部按钮操作 */
}

.tsparticles-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}